<?php
/**
 * Created by Command.
 * User: Vito
 */

declare (strict_types = 1);

namespace app\admin\controller\v1;

use app\admin\controller\BaseController;
use app\logic\PollingRecordLogic;

class PollingRecord extends BaseController
{
    protected $name = '巡检列表';

    protected $registerCurd = true;

    protected $registerCurdDir = true;
    protected $methodName = [
        'getRecordDetail' => '获取记录详情',
        // 'getTotal'   => '获取缴费总汇'
    ];
    /**
     * 初始化
     */
    protected function initialize()
    {
        $this->logic = new PollingRecordLogic();
    }

    /**
     * @Description: 获取巡检记录详情
     * @author: xiayu <cb1071403016@126.com>
     * @Date: 2022-11-04 16:03:18
     * @version: 1.0.0
     * @return [type]
     */
    public function getRecordDetail(){

        $params = $this->request->post();

        $res = $this->logic->getDetail($params);

        if($res){
            return success($res,'获取成功');
        }else{
            return error('获取失败');
        }
    }
}
